// BugReportCheckMd5Dlg.h : header file
//

#pragma once
#include "GetHtmlContent.h"
#include "ConstantDef.h"
#include "BugDetailDlg.h"

// CBugReportCheckMd5Dlg dialog
class CBugReportCheckMd5Dlg : public CDialog
{
// Construction
public:
	CBugReportCheckMd5Dlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_BUGREPORTCHECKMD5_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

private:

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnSize(UINT nType, int cx, int cy);

	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedStart();
	afx_msg void OnRClickBugItem(NMHDR* pNotifyStruct, LRESULT* result);
	afx_msg void OnOpenURL();
	afx_msg void OnOpenBugDetailDlg();

private:
	void	ReadStandardInfo();
	BOOL	ReadStringFromFile(CFile& oFile, CString& strText);
	void	CheckAllBugID();
	BOOL	IsInvalidFileMD5List(BugInfo& stBugInfo);
	void	ShowScanResult();
	int		GetCurSelItem();

private:
	CGetHtmlContent		m_oGetHtmlContent;

	RECT				m_stListMargin;
	VCT_FILE_INFO		m_vctFileInfo;
	VCT_BUGINFO			m_vctInvalidBugInfo;

	CListCtrl			m_oListCtrl;
	CEdit				m_oEditVersion;
	CEdit				m_oEditPagination;
};
